package com.vivz.baby.repository;

import java.util.Date;
import java.util.List;

import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.vivz.baby.domain.Log;

@Repository(value = "logRepository")
public interface LogRepository extends CrudRepository<Log, Long> {

    List<Log> findByUserIdAndLogTimeBetween(Long userId, Date d1, Date d2);

    List<Log> findByUserIdOrderByLogTimeDesc(Long userId);
}
